import os


class AdbTools(object):
    @staticmethod
    def get_devices():
        ret =[ line.split()[0].split(':')[0] for line in os.popen("adb devices").readlines()[1:-1]]
        print(ret)
        return ret

    @staticmethod
    def dis_connect(ip):
        os.system("adb disconnect " + ip)

    @staticmethod
    def connect(ip):
        os.system("adb connect " + ip)
